package com.lwc.controller;

import com.lwc.bean.User;
import com.lwc.common.bean.ResultBean;
import com.lwc.common.controller.BaseController;
import com.lwc.mapper.UserMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "用户管理")
@RequestMapping("/api/User")
public class UserController extends BaseController {

    @Autowired
    UserMapper userMapper;


    @ApiOperation("查询")
    @GetMapping("/select")
    public ResultBean selectUserById(Long id){
        User user = userMapper.selectById(id);
        return success("查询成功",user);
    }
}
